﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace ExcellentCRM.DataService.Models
{
    /// <summary>
    /// 学员表
    /// </summary>
    public class StuClient : BaseModel
    {
        public StuClient()
        {
            PMIInfo = new PMIInfo();
            StudentInfo = new StudentInfo();
        }
        /// <summary>
        /// 学员信息
        /// </summary>
        public StudentInfo StudentInfo { get; set; }

        /// <summary>
        /// PMI信息(帐号、密码、考试月份、考试结果)
        /// </summary>
        public PMIInfo PMIInfo { get; set; }

        /// <summary>
        /// 是否联系人
        /// </summary>
        public bool? IsContact { get; set; }

        /// <summary>
        /// 是否需要开具发票
        /// </summary>
        public bool? IsNeedInvoice { get; set; }

        /// <summary>
        /// 培训顾问Id
        /// </summary>
        public long ConsultantId { get; set; }

        public long? AcctId { get; set; }

        public long? CompanyId { get; set; }

        public long? GroupId { get; set; }

        public long? GradeId { get; set; }

        [ForeignKey("ConsultantId")]
        public Staff Consultant { get; set; }

        [ForeignKey("AcctId")]
        public Account Account { get; set; }

        [ForeignKey("CompanyId")]
        public virtual EnterpriseClient Company { get; set; }

        [ForeignKey("GroupId")]
        public virtual Group Group { get; set; }

        [ForeignKey("GradeId")]
        public virtual Grade Grade { get; set; }

        public virtual IList<StuCourse> StuCourses { get; set; }

        public virtual IList<AttendanceRecord> AttendanceRecords { get; set; }

        public virtual IList<TestResult> TestResults { get; set; }

        public virtual IList<MembershipCard> MembershipCards { get; set; }

        public virtual IList<ContactRecord> ContactRecords { get; set; } 
    }
}